﻿// -----------------------------------------------------------------------
// <copyright file="SkillComparerBase.cs" company="">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace SoftServe.HrManager.Abstractions
{
    using System;

    using SoftServe.HrManager.Models;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public abstract class SkillComparerBase
    {
        public abstract bool AssertSkill(ISkillEnumerator person, eSkillName skill);

        protected bool IsDerivedFrom(ISkillEnumerator person, Type baseProfile)
        {
            if (person != null && baseProfile != null)
                return person.GetType().IsAssignableFrom(baseProfile);

            return false;
        }
    }
}
